﻿using LexicalAnalyser.DesignArchitecture;
using LexicalAnalyser.Helpers;
using LexicalAnalyser.Implementation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LexicalAnalyser
{
    class Program
    {
        static void Main(string[] args)
        {
            string testCode = @"foreach (var Token in ListOfTokens)
            {
                richTextBox2.Text += string.Format(\n LINE : {0} \t\t TOKEN : {2} \t\t\t TYPE : {1}, Token.LineNo, Token.Token, Token.Id);
                //richTextBox2.Text += (\n Text :  + l.TokenContents +    Token :   + l.Token);";

            List<TokenElement> Tokens = ((ILexer)new Lexer()).Execute_LexicalAnalyser(testCode);
            foreach (var t in Tokens)
            {
                Console.WriteLine("{0}\t{1}\t{2}",t.Id,t.Token,t.LineNo);
            }
            Console.ReadKey();
        }
    }
}
